#include "Stopwatch.h"


Stopwatch::Stopwatch()
{
	::QueryPerformanceFrequency((LARGE_INTEGER*)&frequency);
}


Stopwatch::~Stopwatch()
{
}


void Stopwatch::Start()
{
	::QueryPerformanceCounter((LARGE_INTEGER*)&count);
	elapsedSeconds = 0;
}


void Stopwatch::Stop()
{
	INT64 stopCount;
	::QueryPerformanceCounter((LARGE_INTEGER*)&stopCount);
	elapsedSeconds = (double)(stopCount - count) / (double)frequency;
}